<%--
  Created by IntelliJ IDEA.
  User: luoxuan
  Date: 2022/11/4
  Time: 9:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>题目列表</title>
</head>
<body>
    <form action="index">
        <select name="subject">
            <option value="">全部</option>
            <option value="101">101</option>
            <option value="102">102</option>
            <option value="103">103</option>
        </select>
        <button>查询</button>
    </form>
    <a href="addpre">新增题目</a>
    <table border="1" width="1000">
    <thead>
    <tr>
        <th>编号</th>
        <th>题目</th>
        <th>A选项</th>
        <th>B选项</th>
        <th>C选项</th>
        <th>D选项</th>
        <th>答案</th>
        <th>所属课程</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${questions}" var="item">
        <tr>
            <td>${item.questionid}</td>
            <td>${item.question}</td>
            <td>${item.optiona}</td>
            <td>${item.optionb}</td>
            <td>${item.optionc}</td>
            <td>${item.optiond}</td>
            <td>${item.answer}</td>
            <td>${item.subject}</td>
            <td>
                <a href="delete?questionid=${item.questionid}">删除</a>
                <a href="updatepre?questionid=${item.questionid}">修改</a>
            </td>
        </tr>
    </c:forEach>
    </tbody>
    </table>
</body>
</html>
